\documentclass[xcolor=dvipsnames]{beamer}
\usepackage{media9}
\usepackage{hyperref}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\usepackage{graphicx}
\usepackage{amssymb,amsmath}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{array} 
\mode<article>
{
  \usepackage{times}
  \usepackage{mathptmx}
  \usepackage[left=1.5cm,right=6cm,top=1.5cm,bottom=3cm]{geometry}
}

\definecolor{my_orange}{RGB}{238,65,0}

\useoutertheme[height=0pt,width=2cm,right]{sidebar}
\usecolortheme{rose,sidebartab}
\useinnertheme{circles}
\usefonttheme[only large]{structurebold}

\setbeamercolor{sidebar right}{bg=black!15}
\setbeamercolor{structure}{fg=my_orange}
\setbeamercolor{author}{parent=structure}

\setbeamerfont{title}{series=\normalfont,size=\LARGE}
\setbeamerfont{title in sidebar}{series=\bfseries}
\setbeamerfont{author in sidebar}{series=\bfseries}
\setbeamerfont*{item}{series=}
\setbeamerfont{frametitle}{size=}
\setbeamerfont{block title}{size=\small}
\setbeamerfont{subtitle}{size=\normalsize,series=\normalfont}


\setbeamertemplate{title page}
{
  \vbox{}
  \vskip1em
%  {\huge Kapitel \insertshortlecture\par}
  {\usebeamercolor[fg]{title}\usebeamerfont{title}\inserttitle\par}%
  \ifx\insertsubtitle\@empty%
  \else%
    \vskip0.25em%
    {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
  \fi%     
  \vskip1em\par

  SPIE Optical Engineering + Applications 2013\par
  \insertdate\par
  \vskip0pt plus1filll
  \leftskip=0pt plus1fill\insertauthor\par
  \insertinstitute\vskip1em
}


\setbeamertemplate{sidebar right}
{
  \vskip0.5em
  \hbox to2cm{\hss\insertlogo\hss}
  \vskip0.5em
  \insertverticalnavigation{2cm}%
  \vfill
  \hbox to 2cm{\hfill\usebeamerfont{subsection in
      sidebar}\strut\usebeamercolor[fg]{subsection in
      sidebar}\insertframenumber\hskip5pt}
  \vskip1.5pt
}

\logo{\includegraphics[width=1.5cm]{images/logo-usb.png}}




\title[Adaptive control system for improvement of contrast in interferograms]{Adaptive control system for improvement of contrast in interferograms}
\author[N. Veloz]{Nicolás Veloz*, Jesús González-Laprea, Rafael Escalona\\ \small\href{mailto:nveloz@usb.ve}{* nveloz@usb.ve}}
\institute{Optic and Interferometry Lab. \\ Simón Bolívar University}
\subject{Subject} 
\date{August 2013}

\begin{document}

\begin{frame}<handout:0>
  \titlepage
\end{frame}


%\begin{frame}<beamer>\frametitle{Content}\tableofcontents
%\end{frame}

%----------------------------------------------------------------------------------------------------------------------------------%
%------------------------------------------------\begin{comment}-------- INTRODUCTION ------------------------------------------------------------%
%----------------------------------------------------------------------------------------------------------------------------------%
\section[Introduction]{Introduction}

%---------------------------------------------------- APRENDIZAJE DE ROBOTS -------------------------------------------------------%
\subsection*{Interferogram Resolution}
\begin{frame}\frametitle{Resolution in interferograms}
	There is a direct relation between the number of gray levels of an interferogram image and the resolution of the optical phase.
	\begin{equation}
		I_d = I_1 + I_2 + 2\sqrt{I_1 I_2}\cos (\Delta \phi)
	\end{equation}	
	Where $\Delta \phi = \phi_1 - \phi_2$ and $\phi = \frac{2 \pi}{\lambda} (2 \Delta x)$

	\begin{figure}[t]
		\includegraphics[width=0.4\textwidth]{images/altura-dx.png}
		\caption{Interferogram of inclinated plane}
	\end{figure}
	The minimum phase difference between two consecutives gray levels can be obteined with $\Delta \phi_\min = \frac{\pi}{N}$
\end{frame}

\subsection*{Capture and Contrast}
\begin{frame}\frametitle{Camera CCD sensor}
	The camera integrates the intensity of every pixel over the capture time
	\begin{figure}[t]
		\includegraphics[width=0.5\textwidth]{images/ccdintro.jpg}
		\caption{CCD sensor diagram}
	\end{figure}
\end{frame}

\begin{frame}\frametitle{Contrast Reduction}

	\begin{figure}[t]
		\includemedia[activate=onclick,width=0.9\textwidth]{\includegraphics{images/gotas-en.png}}{images/gotas-en.swf}
	\end{figure}
	
\end{frame}
\begin{frame}\frametitle{Contrast Reduction}
	If the image adquisition frequency is sinchronized with the main vibration frequency:
	\begin{itemize}
		\item The position of the fringes will be the same for all images
		\item The contrast of the image will be less than the images captured without vibrations.
	\end{itemize}
\end{frame}
\begin{frame}\frametitle{Hypothesis}
	The contrast of the interferograms can be improved by using:
	\begin{itemize}
		\item A CCD Camera as the only sensor to grab the interferograms.
		\item A piezoelectric device to modify the difference of the optical phase.
	\end{itemize}
	How:
	\begin{itemize}
		\item Synchronizing the frequency of the camera with the main vibration frequency.
		\item Injecting signals to the piezoelectric to compensate the vibrations.
	\end{itemize}
	But...
	\begin{center}
		How to know the signal which is going to compensate the vibrations?
	\end{center}
\end{frame}

\section[Algorithm]{Algorithm}
\subsection*{Conrol Algorithm}

\begin{frame}\frametitle{Syncronizing}
	Usually the vibrations have some frequency peaks multiples of a certain frequency depending on its origins.
	

	For induction motors, the principal frequency components can be found at:

	\begin{itemize}
		\item $\frac{1}{2} X$, $X$ and/or $2 X$. Where $X$ is the rotation frequency.
		\item $f_L$ and/or $2 f_L$. Where $f_L$ is the frequecny of the AC power line.
	\end{itemize}
The camera's frame per second can be specified such that the biggest peaks of the vibration spectrum is multiple of the camera frequency.
\end{frame}

\begin{frame}\frametitle{Vibration Spectrum}
	A simple vibration analisys shows some frequency peaks at multiples of $30Hz$.
	\begin{figure}[t]
		\includegraphics[width=0.6\textwidth]{images/noise-spectrum.png}
		\caption{Symple vibration analisys}
	\end{figure}
	
	
\end{frame}


\begin{frame}\frametitle{How to compensate the vibrations}
	If the vibration and the camera frequencies are synchronized:
	\begin{figure}[t]
		\includegraphics[width=1\textwidth]{images/simulated-noise.png}
		\caption{Noise simulation}
	\end{figure}
	\begin{itemize}
		\item The noise envelop is almost the same in each image.
		\item The injected signal should be the same with oposit sign.
	\end{itemize}
\end{frame}

\begin{frame}\frametitle{How to compensate the vibrations}
	\begin{itemize}
		\item It has to be found a signal similar to the noise envelop.
		\item To be applied with oposite sign within each integration time of the camera.
	\end{itemize}

	\begin{center}
		How can be found a signal without any sensor?
	\end{center}
	The control algorithm makes an initial random search, and then adapts the control signal looking for a better contrast.
\end{frame}


\begin{frame}\frametitle{How to compensate the vibrations}
	
	\begin{figure}[t]
		\includemedia[activate=onclick,width=1\textwidth]{\includegraphics{images/flujo-en.png}}{images/flujo-en.swf}
	\end{figure}
\end{frame}

\section[Results]{Results}
\subsection*{Simulator}



\begin{frame}\frametitle{Interferometry Simulator}
	The simulator was developed in C++ with OpenCV library to simulate:
	\begin{itemize}
		\item The interference from different light sources: monochromatic or non-monochromatic.
		\item A Mirau or Michelson interferometer
		\item The capture process of a camera: absorption spectrums and integration time.
		\item Perturbations with specific spectrums.
		\item The surface height and the refraction index of a sample.
	\end{itemize}
\end{frame}




\begin{frame}\frametitle{Simulation Conditions}
	The tests were made with the following parameters:
	\begin{itemize}
		\item Light Source: Gaussian spectrum, $\lambda = 546,1nm$, with spectral width of $10nm$
		\item Ideal Mirau interferometer
		\item Absorption Spectrum: Cannon 10D RGB spectra
		\item Sample: inclinated plane of $100$ reflective surface
		\item Vibrations from spectrum
	\end{itemize}
	\begin{figure}
		\centering
		\begin{subfigure}[b]{0.49\textwidth}
			\centering
			\includegraphics[width=1\textwidth]{images/espectros_canon-en.png}
			\caption{Absortion Spectrums}
		\end{subfigure}
		\begin{subfigure}[b]{0.49\textwidth}
			\centering
			\includegraphics[width=1\textwidth]{images/noise-spectrum.png}
			\caption{Vibration Spectrum}
		\end{subfigure}
		\caption{Camera Spectrums and Vibration Spectrum}
	\end{figure}


\end{frame}

\begin{frame}\frametitle{Simulation Results}
	After 60s of adaptative process the contrast was improved but not sistematically (each image captured at $30fps$)
	\begin{figure}
		\centering
		\includegraphics[width=1\textwidth]{images/contrast-evolution-sim.png}
		\caption{Best result obtained}
	\end{figure}
\end{frame}

\subsection*{Real Assembly}

\begin{frame}\frametitle{Assembly}
	The algorithm was tested in a real system.
	\begin{itemize}
		\item Nikon Optiphot Interferential Microscope with a 20X Mirau-type Objective.
		\item Piezoelectric Device PI-720 PIFOC with a source/amplifier PI E-662
		\item National Instrument NIDAQ 6023E adquisition board.
		\item PixeLINK PL-B776U CMOS Camera.
		\item $100W$ Tungsten filament with spectral band-pass filter centered in $\lamda=546,1nm$ and spectral width of $10nm$
	\end{itemize}
	\begin{figure}
		\centering
		\includegraphics[width=0.4\textwidth]{images/assembly-diagram.png}
		\caption{Assembly Diagram}
	\end{figure}
\end{frame}

\begin{frame}\frametitle{Test Procedure}
	Test Conditions:
	\begin{itemize}
		\item Camera frequency: $10fps$
		\item Sample: silicon crystal surface
		\item Contrast meassurement: contrast along a straight line
		\begin{center}
			$contrast=\frac{L_{\max} - L_{\min}}{L_{\max} + L_{\min}} $
		\end{center}
	\end{itemize}
	Test Procedure:
	\begin{enumerate}
		\item Set the optical length equal for both interferometer arms.
		\item Wait for stabilization and turn on the control algorithm.
		\item Start the adaptative process (at least $480s$)
		\item Stop the adaptative process and mantain the control signal.
	\end{enumerate}
\end{frame}

\begin{frame}\frametitle{Experimental Results}
	Not all test were successfull, however some of them got good results.
	\begin{figure}
		\centering
		\includegraphics[width=1\textwidth]{images/contrast-evolution-real.png}
		\caption{Contrast evolution}
	\end{figure}
	Contrast improvement: $12,4 \%$
\end{frame}



\section[Conclusions]{Discussion and Conclusions}
\subsection*{Discussion}

\begin{frame}\frametitle{Discussion}
	\begin{itemize}
		\item In the simulation the results were better than in the real experiment.
		\item The simulation average improvement was: $21\%$. In the real experiment was: $5\%$
		\item The piezoelectric response filters some of the components of the control signal.
		\item The algorithm acts as a random search, therefore, it can not be stablished a convergence time.		
	\end{itemize}
\end{frame}

\subsection*{Conclusion}

\begin{frame}\frametitle{Conclusion}
	
	This is a work in development, however the algorithm could give good results if:
\begin{itemize}
	\item The vibration are sinchronized with the camera frequency.
	\item The adaptation process is allowed to take some time
\end{itemize}

The adaptative process has to be stoped before taking the meassurements.
		
\end{frame}

\begin{frame}
	\begin{center}
    	\LARGE Thank you for your attention \newline
	\end{center}
\end{frame}

\begin{frame}
	\begin{center}
    	\LARGE Thank you for your attention \newline
	\end{center}
\end{frame}


\begin{frame}
	\begin{center}
    	\LARGE Thank you for your attention \newline
	\end{center}
\end{frame}


\begin{frame}\frametitle{Resultant control signal}
	\begin{figure}
		\centering
		\includegraphics[width=1\textwidth]{images/control-signal.png}
		\caption{Control signal}
	\end{figure}
\end{frame}

\begin{frame}\frametitle{Equivalent control signal spectrum}
	\begin{figure}
		\centering
		\includegraphics[width=1\textwidth]{images/control-signal-spectrum.png}
		\caption{Equivalent control signal spectrum}
	\end{figure}
\end{frame}


\end{document}

